﻿@{
    Layout = null;
}
@using OptimaJet.Workflow.Core.Model
@model OpenAuth.App.ViewModel.CommonApplyVM

<script src="/Scripts/jquery.js"></script>
<script src="/Scripts/jquery-ui.js"></script>
<script src="/Scripts/kinetic-v5.1.0.min.js"></script>
<script src="/Scripts/workflowdesigner.min.js"></script>
<script src="/Scripts/designerconstants.js"></script>
<script src="/Scripts/ace.js"></script>
<script src="/Scripts/json5.js"></script>
<script src="/BllScripts/queryString.js"></script>

<link href="/Content/plugins/jQueryUI/base/jquery-ui.min.css" rel="stylesheet" />
<link href="/Content/workflowdesigner.css" rel="stylesheet" type="text/css" />

<input value="@Model.Id" id="processId" type="hidden" />
<input value="@Model.WorkflowName" id="schemeCode" type="hidden" />

  @if (Model.Commands.Length > 0)
    {
    <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
        <p>
            <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
            下图蓝色为当前状态，你可以执行：
            @foreach (var cmd in Model.Commands)
            {
            if (cmd.Classifier == TransitionClassifier.Reverse)
            {
            <button class="workflowcmd" value="@cmd.Key">@cmd.Value</button>
            }
            else
            {
            <button class="workflowcmd" value="@cmd.Key">@cmd.Value</button>
            }
            }
        </p>
    </div>

    }

<div id="wfdesigner"></div>

<script src="/BllScripts/queryString.js"></script>
<script src="/BllScripts/processDetail.js?v=1"></script>